FROM php:7.4-fpm
RUN docker-php-ext-install -j$(nproc) bcmath calendar exif gettext sockets dba mysqli pcntl pdo_mysql shmop sysvmsg sysvsem sysvshm

RUN apt-get update && \
    apt-get install -y --no-install-recommends libzip-dev && \
    rm -r /var/lib/apt/lists/* && \
    docker-php-ext-install -j$(nproc) zip

RUN apt-get update && apt-get install -y --no-install-recommends libmcrypt-dev && \
    rm -r /var/lib/apt/lists/* && \
    pecl install mcrypt-1.0.3 && \
    docker-php-ext-enable mcrypt

RUN pecl install redis-5.2.2 && docker-php-ext-enable redis